package com.leen.entity;

import com.leen.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.*;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * 课程教师表
 * @author yy
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "课程教师表模型")
@Table(name = "course_teacher")
@Entity
public class Teacher extends BaseEntity implements Serializable {

    /**
     * 编号
     */
    @ApiModelProperty(value = "编号", example = "0")
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Integer id;


    /**
     * 老师名称
     */
    @ApiModelProperty(value = "老师名称")
    @Column(name  = "name")
    @NotBlank(message = "老师名称不能空")
    private String name;


    /**
     * 头像
     */
    @ApiModelProperty(value = "头像")
    @Column(name  = "portrait")
    @NotBlank(message = "头像不能空")
    private String portrait;


}
